home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / CMScriptingPlugin.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  4.7 KB  |  172 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        CMScriptingPlugin.h
  3.  
  4.      Contains:    ColorSync Scripting Plugin API
  5.  
  6.      Version:    Technology:    ColorSync 2.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1998-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CMSCRIPTINGPLUGIN__
  18. #define __CMSCRIPTINGPLUGIN__
  19.  
  20. #ifndef __FILES__
  21.     #include <Files.h>
  22. #endif
  23.  
  24. #ifndef __CMAPPLICATION__
  25.     #include <CMApplication.h>
  26. #endif
  27.  
  28. #ifndef __CODEFRAGMENTS__
  29.     #include <CodeFragments.h>
  30. #endif
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. #if PRAGMA_ONCE
  38. #pragma once
  39. #endif
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44.  
  45. #if PRAGMA_IMPORT
  46. #pragma import on
  47. #endif
  48.  
  49. #if PRAGMA_STRUCT_ALIGN
  50.     #pragma options align=mac68k
  51. #elif PRAGMA_STRUCT_PACKPUSH
  52.     #pragma pack(push, 2)
  53. #elif PRAGMA_STRUCT_PACK
  54.     #pragma pack(2)
  55. #endif
  56.  
  57. enum {
  58.                                                                 /* ColorSync Scripting AppleEvent Errors */
  59.     cmspInvalidImageFile        = -4220,                        /* Plugin cannot handle this image file type */
  60.     cmspInvalidImageSpace        = -4221,                        /* Plugin cannot create an image file of this colorspace */
  61.     cmspInvalidProfileEmbed        = -4222,                        /* Specific invalid profile errors */
  62.     cmspInvalidProfileSource    = -4223,
  63.     cmspInvalidProfileDest        = -4224,
  64.     cmspInvalidProfileProof        = -4225,
  65.     cmspInvalidProfileLink        = -4226
  66. };
  67.  
  68.  
  69. /**** embedFlags field  ****/
  70. /* reserved for future use: currently 0 */
  71.  
  72. /**** matchFlags field  ****/
  73. enum {
  74.     cmspFavorEmbeddedMask        = 0x00000001                    /* if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present*/
  75. };
  76.  
  77.  
  78. /**** scripting plugin entry points  ****/
  79. typedef CALLBACK_API_C( CMError , ValidateImageProcPtr )(const FSSpec *spec);
  80. typedef CALLBACK_API_C( CMError , GetImageSpaceProcPtr )(const FSSpec *spec, OSType *space);
  81. typedef CALLBACK_API_C( CMError , ValidateSpaceProcPtr )(const FSSpec *spec, OSType *space);
  82. typedef CALLBACK_API_C( CMError , EmbedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, CMProfileRef embedProf, UInt32 embedFlags);
  83. typedef CALLBACK_API_C( CMError , UnembedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto);
  84. typedef CALLBACK_API_C( CMError , MatchImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 qual, UInt32 srcIntent, CMProfileRef srcProf, CMProfileRef dstProf, CMProfileRef prfProf, UInt32 matchFlags);
  85. typedef CALLBACK_API_C( CMError , CountImageProfilesProcPtr )(const FSSpec *spec, UInt32 *count);
  86. typedef CALLBACK_API_C( CMError , GetIndImageProfileProcPtr )(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
  87. typedef CALLBACK_API_C( CMError , SetIndImageProfileProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 index, CMProfileRef prof, UInt32 embedFlags);
  88. /**** CSScriptingLib API  ****/
  89.  
  90. EXTERN_API_C( CMError )
  91. CMValidImage                    (const FSSpec *            spec);
  92.  
  93. EXTERN_API_C( CMError )
  94. CMGetImageSpace                    (const FSSpec *            spec,
  95.                                  OSType *                space);
  96.  
  97. EXTERN_API_C( CMError )
  98. CMEmbedImage                    (const FSSpec *            specFrom,
  99.                                  const FSSpec *            specInto,
  100.                                  Boolean                 repl,
  101.                                  CMProfileRef             embProf);
  102.  
  103. EXTERN_API_C( CMError )
  104. CMUnembedImage                    (const FSSpec *            specFrom,
  105.                                  const FSSpec *            specInto,
  106.                                  Boolean                 repl);
  107.  
  108. EXTERN_API_C( CMError )
  109. CMMatchImage                    (const FSSpec *            specFrom,
  110.                                  const FSSpec *            specInto,
  111.                                  Boolean                 repl,
  112.                                  UInt32                 qual,
  113.                                  CMProfileRef             srcProf,
  114.                                  UInt32                 srcIntent,
  115.                                  CMProfileRef             dstProf);
  116.  
  117. EXTERN_API_C( CMError )
  118. CMProofImage                    (const FSSpec *            specFrom,
  119.                                  const FSSpec *            specInto,
  120.                                  Boolean                 repl,
  121.                                  UInt32                 qual,
  122.                                  CMProfileRef             srcProf,
  123.                                  UInt32                 srcIntent,
  124.                                  CMProfileRef             dstProf,
  125.                                  CMProfileRef             prfProf);
  126.  
  127. EXTERN_API_C( CMError )
  128. CMLinkImage                        (const FSSpec *            specFrom,
  129.                                  const FSSpec *            specInto,
  130.                                  Boolean                 repl,
  131.                                  UInt32                 qual,
  132.                                  CMProfileRef             lnkProf,
  133.                                  UInt32                 lnkIntent);
  134.  
  135. EXTERN_API_C( CMError )
  136. CMCountImageProfiles            (const FSSpec *            spec,
  137.                                  UInt32 *                count);
  138.  
  139. EXTERN_API_C( CMError )
  140. CMGetIndImageProfile            (const FSSpec *            spec,
  141.                                  UInt32                 index,
  142.                                  CMProfileRef *            prof);
  143.  
  144. EXTERN_API_C( CMError )
  145. CMSetIndImageProfile            (const FSSpec *            specFrom,
  146.                                  const FSSpec *            specInto,
  147.                                  Boolean                 repl,
  148.                                  UInt32                 index,
  149.                                  CMProfileRef             prof);
  150.  
  151.  
  152. #if PRAGMA_STRUCT_ALIGN
  153.     #pragma options align=reset
  154. #elif PRAGMA_STRUCT_PACKPUSH
  155.     #pragma pack(pop)
  156. #elif PRAGMA_STRUCT_PACK
  157.     #pragma pack()
  158. #endif
  159.  
  160. #ifdef PRAGMA_IMPORT_OFF
  161. #pragma import off
  162. #elif PRAGMA_IMPORT
  163. #pragma import reset
  164. #endif
  165.  
  166. #ifdef __cplusplus
  167. }
  168. #endif
  169.  
  170. #endif /* __CMSCRIPTINGPLUGIN__ */
  171.  
  172.